<?php
class DetailsAction extends Action {
    private $nav = null;
    private $goods = null;
    private $attr = null;
    private $commend = null;
    private $record = null;
    public function __construct() {
        parent::__construct();
        $this->nav = new NavModel();
        $this->goods = new GoodsModel();
        $this->attr = new AttrModel();
        $this->commend = new CommendModel();
        $this->record = new RecordModel();
    }
    public function index() {
        $this->tpl->assign('theWay',$this->attr->findGoodsAttrWay());
        $this->tpl->assign('oneGoods',$this->goods->findDetailsGoods());
        $this->tpl->assign('FrontNav',$this->nav->showNav());
        $this->tpl->assign('TenNav',$this->nav->findFrontTenNav());
        $this->tpl->assign('pervPage',Tool::getPrevPage());
        $this->tpl->assign('domain',Tool::getDomain());
        $this->tpl->assign('viewRecord',$this->goods->getViewRecord());
        $this->tpl->assign('hotGoods',$this->goods->findHotGoods());
        $this->tpl->display(SMARTY_FRONT.'public/details.html');
    }

    public function isNoMore() {
        $this->goods->isNoMore();
    }

    public function ajaxGetPagenum() {
        $this->commend->ajaxGetPagenum();
    }

    public function ajaxGetCommend() {
        $this->commend->ajaxGetCommend();
    }

    public function ajaxGetRecordNum() {
        $this->record->ajaxGetRecordNum();
    }

    public function ajaxGetRecord() {
        $this->record->ajaxGetRecord();
    }

}


?>